Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N21-1298 tool context restrictions #4579

Merged
merged 38 commits into from
Dec 1, 2023

Conversation

IgorCapCoder
Copy link
Contributor

@IgorCapCoder IgorCapCoder commented Nov 24, 2023

Description

With the new attribute 'restrictToContexts' of an external tool the superhero can restrict the tool usage to contexts (atm only 'course' and 'board-element').
In this PR the SHD endpoints are adjusted to the new attribute, a new context-types endpont is created and the a filter / validation logic is added to the available tools for context (the dropdown to add tools) and the creation of context tools.

Links to Tickets or other pull requests

https://ticketsystem.dbildungscloud.de/browse/N21-1298
hpi-schul-cloud/superhero-dashboard#235
hpi-schul-cloud/nuxt-client#2929

Changes

Datasecurity

Deployment

New Repos, NPM pakages or vendor scripts

Approval for review

  • DEV: If api was changed - generate-client:server was executed in vue frontend and changes were tested and put in a PR with the same branch name.
  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

# Conflicts:
#	apps/server/src/modules/tool/context-external-tool/service/context-external-tool.service.spec.ts
#	apps/server/src/modules/tool/context-external-tool/service/context-external-tool.service.ts
#	apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts
#	apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.ts
MBergCap and others added 4 commits December 1, 2023 11:57
# Conflicts:
#	apps/server/src/modules/tool/external-tool/controller/api-test/tool-configuration.api.spec.ts
#	apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.spec.ts
#	apps/server/src/modules/tool/external-tool/uc/external-tool-configuration.uc.ts
#	apps/server/src/modules/tool/tool-launch/controller/api-test/tool-launch.controller.api.spec.ts
@IgorCapCoder IgorCapCoder enabled auto-merge (squash) December 1, 2023 14:45
Copy link

sonarqubecloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
1.2% 1.2% Duplication

@IgorCapCoder IgorCapCoder merged commit 81f42f3 into main Dec 1, 2023
47 of 48 checks passed
@IgorCapCoder IgorCapCoder deleted the N21-1298-tool-context-restrictions branch December 1, 2023 15:26
bergatco pushed a commit that referenced this pull request Dec 6, 2023
* get tools/context-types
* extend external tool data model by restrictToContexts
* available tools filter for contexts
* create context external tool validation for restricted contexts
* add seed data

---------

Co-authored-by: Malte Berg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants